package com.sunday.common.statemachine.study.e12_Using_Extended_State;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.statemachine.event.OnExtendedStateChanged;
import org.springframework.stereotype.Component;

/**
 * TODO
 *
 * @author sunday
 * @since 2024/12/6
 */
@Slf4j
//@Component
public class ExtendedStateVariableEventListener implements ApplicationListener<OnExtendedStateChanged> {

    @Override
    public void onApplicationEvent(OnExtendedStateChanged event) {
        // do something with changed variable
        log.info("[ApplicationListener]Extended state changed: {}", event);
    }
}